<?=$header?>
<body>
    <?=$js?>
	<?=$navigate?>
	<!-- MAIN CONTENT -->
	<div id="content">
		
		<div class="page-full-width cf">
            <?=$sidebarleft?>
			
            <div class="side-content fr">
			<div class="content-module">
			
				<div class="content-module-heading cf">
				
					<h3 class="fl"><?=$title_page?></h3>
					<span class="fr expand-collapse-text">Click to collapse</span>
					<span class="fr expand-collapse-text initial-expand">Click to expand</span>
				
				</div> <!-- end content-module-heading -->
				
				
				<div class="content-module-main">
				<p><?php echo anchor($this->config->item('main_url').'/product/add', 'Add', array('class'=>'button round blue image-right ic-add text-upper')) ?></p>
				<form name="kform" id="kform" action="<?=$this->config->item('main_url').'/product/action'?>" method="post">	
					<table id="datatable">
					
						<thead>
					
							<tr>
								<th><input type="checkbox" id="table-select-all" onclick="checkAll();"></th>
								<th>Name</th>
								<th>Code</th>
								<th>Supllier</th>
								<th>Cost</th>
                                <th>Sell</th>
                                <th>Quantity</th>
                                <th>action</th>
							</tr>
						
						</thead>

						<tfoot>
						
							<tr>
							
								<td colspan="5" class="table-footer">
								
									<label for="table-select-actions">With selected:</label>

									<select id="table-select-actions" name="action">
										<option value="option1">Delete</option>
										<option value="option2">Export</option>
										<option value="option3">Archive</option>
									</select>
									
									<a href="javascript:void(0)" onclick="subform();" class="round button blue text-upper small-button">Apply to selected</a>	

								</td>
								
							</tr>
						
						</tfoot>
						
						<tbody>
                            <?php
                                foreach($list as $k=>$item):
                            ?>
							<tr>
								<td><input type="checkbox" value="<?=$item['idproduct']?>" name="checklist[]" id="check_box" /></td>
								<td><?=$item['name']?></td>
                                <td><?=$item['code']?></td>
								<td><?=$item['supplier']?></td>
                                <td><?=$item['cost']?></td>
                                <td><?=$item['sell']?></td>
                                <td><?=$item['available']?></td>
								<td>
                                    <?=anchor($this->config->item('main_url').'/product/update/'.$item['idproduct'], ' ', array('class'=>'table-actions-button ic-table-edit'));?>
                                    <?=anchor($this->config->item('main_url').'/product/delete/'.$item['idproduct'], ' ', array('class'=>'table-actions-button ic-table-delete'));?>
								</td>
							</tr>
                            <?php
                                endforeach;
                            ?>
						</tbody>
						
					</table>
					</form>
					<div class="stripe-separator"><!--  --></div>
					
				</div> <!-- end content-module-main -->
			
			</div> <!-- end content-module -->
		  </div>
		</div> <!-- end full-width -->
			
	</div> <!-- end content -->
	
	
	
	<!-- FOOTER -->
	<?=$footer?>
    <!-- end footer -->

</body>
</html>